#include "ctextedit.h"
#include <QDebug>
#include <QEvent>
#include <QApplication>

CTextEdit::CTextEdit(QWidget *parent) :
    QTextEdit(parent)
{
    this->setFontPointSize(12);
    this->setTabChangesFocus(true);
    this->setFont(QApplication::font());
}

void CTextEdit::mouseDoubleClickEvent ( QMouseEvent *e )
{
    emit doubleClick(this);
    QTextEdit::mouseDoubleClickEvent(e);
}

void CTextEdit::refresh()
{
    QString html = this->toHtml();
    this->clear();
    this->setHtml(html);
}
